package biz.obake.team.touchprotector.lfd;

import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import biz.obake.team.android.a;

public class e implements a {

    /* renamed from: d  reason: collision with root package name */
    private static e f1743d;

    /* renamed from: a  reason: collision with root package name */
    private Resources f1744a;

    /* renamed from: b  reason: collision with root package name */
    private String f1745b;

    /* renamed from: c  reason: collision with root package name */
    private int f1746c;

    private e() {
        e();
    }

    public static e d() {
        if (f1743d == null) {
            f1743d = new e();
        }
        return f1743d;
    }

    private void e() {
        this.f1744a = a.a().getResources();
        this.f1745b = a.a().getPackageName();
        int i = 0;
        this.f1746c = 0;
        while (i < 100) {
            if (this.f1744a.getIdentifier("lock_frame_" + i, "drawable", this.f1745b) != 0) {
                this.f1746c++;
                i++;
            } else {
                return;
            }
        }
    }

    public String a(int i) {
        return String.format("preset:%d", new Object[]{Integer.valueOf(i)});
    }

    public Drawable b(int i) {
        int identifier = this.f1744a.getIdentifier("lock_frame_" + i, "drawable", this.f1745b);
        if (identifier != 0) {
            return this.f1744a.getDrawable(identifier).mutate();
        }
        return null;
    }

    public String c(int i) {
        String str = "lock_frame_title_" + i;
        int identifier = this.f1744a.getIdentifier(str, "string", this.f1745b);
        return identifier != 0 ? this.f1744a.getString(identifier) : str;
    }

    public int getCount() {
        return this.f1746c;
    }
}
